package com.ruoyi.asset.sorting.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.asset.sorting.domain.GarbageSorting;
import com.ruoyi.asset.sorting.domain.bo.GarbageSortingSearchBo;
import com.ruoyi.asset.sorting.domain.bo.SortingTypeBo;
import com.ruoyi.asset.sorting.domain.bo.StatisticianSortingByRegion;
import com.ruoyi.asset.sorting.domain.vo.GarbageSortingVo;
import com.ruoyi.asset.sorting.domain.vo.SortingCommunityCountVo;
import com.ruoyi.common.core.mapper.BaseMapperPlus;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * 垃圾分类督导管理范围Mapper接口
 *
 * @author lq
 * @date 2023-11-30
 */
public interface GarbageSortingMapper extends BaseMapperPlus<GarbageSortingMapper, GarbageSorting, GarbageSortingVo> {
    /**
     * 删除管养范围
     */
    int logicDeleteMaintenanceScope(@Param("idsSet") Set<Long> idsSet);

    /**
     * 分页查询垃圾分类督导管理范围
     */
    Page<GarbageSortingVo> selectMaintenanceScopeWithPage(IPage<GarbageSortingVo> page, @Param("searchBo") GarbageSortingSearchBo searchBo);

    /**
     * 查询垃圾分类督导管理范围(不分页)
     */
    List<GarbageSortingVo> exportMaintenanceScope(GarbageSortingSearchBo searchBo);

    /**
     * 查询垃圾分类督导点数量
     */
    int getGarbageSortingCount();

    /**
     * 统计垃圾分类督导
     */
    List<StatisticianSortingByRegion> statForSortingByRegion();

    List<SortingTypeBo> getGarbageSortingCommunityCount(@Param("community") String community);

    List<SortingTypeBo> selectByCommunityAndDateCount(@Param("community") String community, @Param("date")String date);

    Integer selectSortingCountByCommunity(@Param("date") String date,@Param("community") String community);

    int selectSumDate(@Param("date") String date);

}
